package com.realshare.frame.util;


import org.apache.commons.collections4.map.CaseInsensitiveMap;

/**
 * ${DESCRIPTION}
 * author leisure
 * email 15075107120@139.com
 * create 2019-02-20 上午 11:04
 * modify 2019-02-20 上午 11:04
 **/
public class EasyHashMap extends CaseInsensitiveMap {

    public String getString(String key) {
        Object value = get(key);
        if (value != null) {
            return value.toString();
        }
        return "";
    }

    public double getDouble(String key) {
        Object value = get(key);
        if (value != null) {
            return Double.parseDouble(value.toString());
        }
        return 0;
    }

    public int getInt(String key) {
        Object value = get(key);
        if (value != null) {
            return Integer.parseInt(value.toString());
        }
        return 0;
    }
}
